package com.cqggrw.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.cqggrw.dao.AppraiseDaoI;
import com.cqggrw.dao.impl.AppraiseDaoImpl;
import com.cqggrw.domain.Appraise;
import com.cqggrw.service.AppraiseServiceI;

public class AppraiseServiceImpl implements AppraiseServiceI {
	
	private AppraiseDaoI dao = new AppraiseDaoImpl();

	public boolean addAppraise(Appraise t) {
		return dao.addAppraise(t);
	}

	public Appraise getById(Integer id) {
		return dao.getById(id);
	}

	public Object getByNews(Appraise t) {
		// TODO Auto-generated method stub
		return null;
	}

	public Object getList(Appraise t) {
		List<Appraise> list = dao.getList(t);
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("total", dao.getCount());
		map.put("rows", list);
		return map;
	}

	public boolean delete(Integer id) {
		return dao.delete(id);
	}

}
